Namespace Ventas
Public Class Descuentos
	Inherits Auditoria.Transaccion

	Private vDescuentoId As Integer = -1
	Private vNombre As String = ""
	Private vDescripcion As String = ""
	Private vEstado As Integer = -1

	Public Property DescuentoId() As Integer
		Get
			Return vDescuentoId
		End Get
		Set(ByVal Value As Integer)
			vDescuentoId = Value
		End Set
	End Property

	Public Property Nombre() As String
		Get
			Return vNombre
		End Get
		Set(ByVal Value As String)
			vNombre = Value
		End Set
	End Property

	Public Property Descripcion() As String
		Get
			Return vDescripcion
		End Get
		Set(ByVal Value As String)
			vDescripcion = Value
		End Set
	End Property

	Public Property Estado() As Integer
		Get
			Return vEstado
		End Get
		Set(ByVal Value As Integer)
			vEstado = Value
		End Set
	End Property

	Sub New()
	End Sub

	Sub New(ByRef DescuentoId As Integer, ByVal Nombre As String, ByVal Descripcion As String, ByVal Estado As Integer)
		vDescuentoId = DescuentoId
		vNombre = Nombre
		vDescripcion = Descripcion
		vEstado = Estado
	End Sub

End Class



 Public Class DescuentosCol   
 Inherits System.Collections.CollectionBase
Private _enmSortDirection As SortDirection
Public Sub New()
_enmSortDirection = SortDirection.Asc
End Sub
Public Sub Sort(ByVal sortExpression As String, ByVal sortDirection As SortDirection)
InnerList.Sort(New Comparer(sortExpression, SortDirection))
End Sub
Public Sub Sort(ByVal sortExpression As String)
InnerList.Sort(New Comparer(sortExpression, _enmSortDirection))
If _enmSortDirection = SortDirection.Asc Then
_enmSortDirection = SortDirection.Desc
Else
_enmSortDirection = SortDirection.Asc
End If
End Sub
Public Function Add(ByVal obj As Descuentos) As Integer
Return MyBase.List.Add(obj)
End Function
Public Sub AddPrimero(ByVal obj As Descuentos)
MyBase.List.Insert(0, obj)
End Sub
Public ReadOnly Property Descuentos(ByVal Index As Integer) As Descuentos
Get
Return CType(MyBase.List(Index), Descuentos)
End Get
End Property
End Class
end namespace

